From 205d0eb4da6b568b94a9e6df768569f74e240af2 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 26 Sep 2011 15:53:48 +0200 Subject: [PATCH] styleproperty: Default to transparent background-color --- gtk/gtkstyleproperty.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c index 483feaab02..a27d0775a4 100644 --- a/gtk/gtkstyleproperty.c +++ b/gtk/gtkstyleproperty.c @@ -2156,6 +2156,16 @@ border_image_width_default_value (GtkStyleProperties *props, { } +static void +background_color_default_value (GtkStyleProperties *props, + GtkStateFlags state, + GValue *value) +{ + GdkRGBA transparent_black = { 0, 0, 0, 0 }; + + g_value_set_boxed (value, &transparent_black); +} + static void border_color_default_value (GtkStyleProperties *props, GtkStateFlags state, @@ -2561,7 +2571,7 @@ gtk_style_property_init (void) NULL, NULL, NULL, - NULL, + background_color_default_value, NULL); _gtk_style_property_register (g_param_spec_boxed ("font-family", -- 2.30.2